package com.baomidou.springboot.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author jack
 * @since 2021-12-06
 */
@Getter
@Setter
@TableName("user")
@ApiModel(value = "User对象", description = "")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId("test_id")
    private Long testId;

    @ApiModelProperty("租户ID")
    @TableField("tenant_id")
    private Long tenantId;

    @ApiModelProperty("名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("年龄")
    @TableField("age")
    private Integer age;

    @ApiModelProperty("测试下划线字段命名类型")
    @TableField("test_type")
    private Integer testType;

    @ApiModelProperty("日期")
    @TableField("test_date")
    private LocalDateTime testDate;

    @ApiModelProperty("测试")
    @TableField("role")
    private Long role;

    @ApiModelProperty("手机号码")
    @TableField("phone")
    private String phone;


    @Override
    public Serializable pkVal() {
        return this.testId;
    }

}
